﻿using System;
using System.Drawing;
using DevComponents.AdvTree;
using DevComponents.DotNetBar;
using PolePosition.v3.Common;

namespace PolePosition.v3.Desktop.Grids
{
    public partial class GridVisitToAssetBase : GridBase
    {
        public const string newText = "<<new>>";

        public GridVisitToAssetBase(Enumerations.DataTypes gridDataType) : base (gridDataType)
        {
            InitializeComponent();
            ExportToExcelVisible = false;
            MapVisible = false;

            bar1.Items.Insert(2, buttonToAsset);
        }

        public GridVisitToAssetBase()
        {
            InitializeComponent();
        }

        private void buttonToAsset_Click(object sender, EventArgs e)
        {
            DoVisitToAsset();
        }

        public virtual void DoVisitToAsset()
        {
        }

        public static void MarkCellAsInvalid(Cell cell)
        {
            cell.StyleNormal = new ElementStyle { BackColor = Color.Pink };
            cell.Parent.Tag = false;
        }
    }
}
